<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="syscode" uri="/syscode" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<div id="formPageSwap">
  <br/>
<form id="addNewsFormData" name="addNewsFormData" isCheck="true" action="com.jy.modules.cims.tcmmconstrainttype.controller.TCMmConstraintTypeController">
 <div class="expandSwap">
 	<div class="ui-widget-header ui-corner-all">
		<span class="text">约束类型</span><span class="expandBtn"></span>
	</div>
	<div class="expandContent">
		 <input type="hidden" class="text" id="dtoid" name="id" maxLength="11" value="${dto.id}" />
		 <table id="addNewsTableId" class="formTableSwap" border="0" align="center" cellpadding="0" cellspacing="1" >
			<tr>
			  <th>约束名称：</th>
			  <td > 
			  <input type="text" class="text" id="dtoconstraintName" name="constraintName" notNull="false"  value="${dto.constraintName}" />
			  </td>
			  <th>约束字段：</th>
			  <td > 
			  <input type="text" class="text" id="dtoconstraintCode" name="constraintCode" notNull="false" maxLength="16" value="${dto.constraintCode}" />
			  </td>
			  <th>约束域：</th>
			  <td > 
			  <input type="text" class="text" id="dtoconstraintPlace" name="constraintPlace" notNull="false" maxLength="16" value="${dto.constraintPlace}" />
			  </td>
			</tr>
			<tr>
			  <th>约束类型 ：</th>
			  <td > 
			  <syscode:dictionary name="constraintType" extendProperty="notNull=false" defaultValue="${dto.constraintType}" codeType="CIMS_CONSTRAINTTYPE"
					id="dtoconstraintType"	className="text"	type="select"/>
			  </td>
			  <th>选项类型 ：</th>
			  <td colspan="3"> 
			  <syscode:dictionary name="optionType" extendProperty="notNull=false" defaultValue="${dto.optionType}" codeType="CIMS_OPTIONTYPE"
					id="dtooptionType"	className="text"	type="select"/>
			  </td>
			</tr>
		  </table>
	</div>
	<div class="ui-widget-header ui-corner-all">
		<span class="text">约束值</span><span class="expandBtn"></span>
	</div>
 </div>
<!-- 保存 关闭 按钮 在 查询页面进行控制 -->  
</form>
	<div id="cimsConstraintContainer">
		<ul id="itemList">
			<c:if test="${empty list}">
				<li>
					<input type="hidden" class="text"  name="constraintId" notNull="false" maxLength="11" value="${item.id}" />
					<label for="dtoconstraintValue">约束值：</label>
					<input type="text" class="text"  name="constraintValue" notNull="false" maxLength="16" value="${item.constraintValue}" />
					<input type="button" value="删除" />
				</li>
			</c:if>
			<c:if test="${not empty list}">
				<c:forEach var="item" items="${list}">
					<li>
						<input type="hidden" class="text"  name="constraintId" notNull="false" maxLength="11" value="${item.id}" />
						<label for="dtoconstraintValue">约束值：</label>
						<input type="text" class="text"  name="constraintValue" notNull="false" maxLength="16" value="${item.constraintValue}" />
						<input type="button" value="删除" />
					</li>
				</c:forEach>
			</c:if>
		</ul>
	</div>
	<div class="expandToolbar">
		<span class="submitBtn" onclick="addItem();">新增约束值</span>
	</div>
</div>
<script type="text/javascript" src="<%=basePath %>/js/cims/paramManage/queryTCMmConstraintType.js"></script>

<script type="text/javascript">
   		checkedInit();
</script>
  
</html>
